import request from '@/utils/request'

export const userList = (params) => {
  return request({
    url: '/user/list',
    params
  })
}

// 新增角色
export const userAddPost = (data) => {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}
// 编辑角色
export const userEdit = (data) => {
  return request({
    url: '/user/edit/' + data.id,
    method: 'post',
    data
  })
}
// 删除角色
export const userRemove = (id) => {
  return request({
    url: '/user/remove/',
    method: 'post',
    data: {
      id
    }
  })
}
// 设置用户状态
export const userStatus = (id) => {
  return request({
    url: '/user/status',
    method: 'post',
    data: {
      id
    }
  })
}
